//
//  CC_ClassifyHugeImage_CollectionViewCell.m
//  HimalayaMountain
//
//  Created by dllo on 16/7/15.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CC_ClassifyHugeImage_CollectionViewCell.h"  // 只有大图的cell
#import "CC_Classify_Model.h"
#import "CC_TopListFocusImage_Model.h"

@interface CC_ClassifyHugeImage_CollectionViewCell ()

@property(nonatomic, retain) UIImageView *imageView;

@end


@implementation CC_ClassifyHugeImage_CollectionViewCell


- (void)dealloc
{
    [_topListModel release];
    [_classifyModel release];
    [_imageView release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        self.imageView = [[UIImageView alloc]init];
        [self.contentView addSubview:_imageView];
        [_imageView release];
        
    }
    return self;
}

-(void)layoutSubviews{
    
    [super layoutSubviews];
    self.imageView.frame = self.bounds;
    
}

-(void)setClassifyModel:(CC_Classify_Model *)classifyModel{
    
    if (_classifyModel != classifyModel) {
        [_classifyModel release];
        _classifyModel = [classifyModel retain];
    }
    
    [self.imageView setImageWithURL:[NSURL URLWithString:classifyModel.coverPath] placeholderImage:PLACEHOLDERIMAGE];
    
}


-(void)setTopListModel:(CC_TopListFocusImage_Model *)topListModel{
    if (_topListModel != topListModel) {
        [_topListModel release];
        _topListModel = [topListModel retain];
    }
    [self.imageView setImageWithURL:[NSURL URLWithString:topListModel.pic] placeholderImage:PLACEHOLDERIMAGE];
}


@end
